-
-
Notifications
You must be signed in to change notification settings - Fork 200
Drop support of webpack-dev-server ^4.8, add support for webpack-dev-server ^5.0 #1318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fc3f6a3
to
77c6c42
Compare
@@ -12,6 +12,8 @@ This is a new major version that contains several backwards-compatibility breaks | |||
|
|||
* #1309 Drop ESLint integration (@Kocal) | |||
|
|||
* #1318 Drop webpack-dev-server 4 support, only webpack-dev-server 5 is supported (@Kocal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest mentioning that the supported option in the configuration callback have changed, with a link to their changelog. They have BC breaks in their configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
77c6c42
to
83af774
Compare
83af774
to
c521591
Compare
…8494) Description ----------- ### Description The release of webpack-encore v5 dropped the webpack-dev-server as a dependency and is considered a BC Break, basically why our current config doesn't work: #8371 (comment) > yes it is unrelated, but I noticed it does not work at all 🙃 * https://github.com/symfony/webpack-encore/releases/tag/v5.0.0 * See symfony/webpack-encore#1318 * See symfony/webpack-encore#1336 This PR adds `webpack-dev-server` in v5 as a dependency and adds some configuration to enable hot module reload.  ___ ### Running one devServer for both configurations The current configuration within the `webpack.config.js` checks for the CSS files within the following two paths: * core-bundle/assets/styles/* * core-bundle/contao/themes/flexible/styles/* Changes that are detected in these styles will trigger the reload of the page, thus making it easier for us to work with our assets. As of right now we have 2 Encore configurations, thus kicking out the devServer from the second configuration (as you would have to tie it to another port). The first configuration actually embeds the output path of the backend theme `flexible` so it works both ways. ___ ### Should this be a Bugfix and backported to 5.3? The dev-server has been broken since changing to webpack-encore ^v5 but this is more for DX when working on contao. Backporting this change could be done in a separate PR but I don't think it's really necessary. Commits ------- af290cf Re-Add webpack-dev-server and configure HMR eb15149 Rename the backend.js asset 921ef56 Also consider the `themes/flexible` icons and fonts for HMR 2825107 Trigger pcss compilation on imported files 8add074 Match the webpack configuration for the new IconMinimizer feature 65d6e70 Watch the `core-bundle/contao` directory for template changes as well c4933af Also add the new `contao-backend` asset to all occurrences e84e01a Update the package.lock a7b6b8f Update package-lock 5545373 Revert the `contao-backend` entry and update the public path in DevSe… e6a0964 Update `package-lock.json` 46af7a7 Revert and rebuild the assets 4c85023 Simplify webpack configuration 9818a8d Update webpack configuration d051785 Remove the trailing slashes and uncomment the live reload for HMR
… #8494) Description ----------- ### Description The release of webpack-encore v5 dropped the webpack-dev-server as a dependency and is considered a BC Break, basically why our current config doesn't work: contao/contao#8371 (comment) > yes it is unrelated, but I noticed it does not work at all 🙃 * https://github.com/symfony/webpack-encore/releases/tag/v5.0.0 * See symfony/webpack-encore#1318 * See symfony/webpack-encore#1336 This PR adds `webpack-dev-server` in v5 as a dependency and adds some configuration to enable hot module reload.  ___ ### Running one devServer for both configurations The current configuration within the `webpack.config.js` checks for the CSS files within the following two paths: * core-bundle/assets/styles/* * core-bundle/contao/themes/flexible/styles/* Changes that are detected in these styles will trigger the reload of the page, thus making it easier for us to work with our assets. As of right now we have 2 Encore configurations, thus kicking out the devServer from the second configuration (as you would have to tie it to another port). The first configuration actually embeds the output path of the backend theme `flexible` so it works both ways. ___ ### Should this be a Bugfix and backported to 5.3? The dev-server has been broken since changing to webpack-encore ^v5 but this is more for DX when working on contao. Backporting this change could be done in a separate PR but I don't think it's really necessary. Commits ------- af290cf7 Re-Add webpack-dev-server and configure HMR eb151492 Rename the backend.js asset 921ef56f Also consider the `themes/flexible` icons and fonts for HMR 2825107e Trigger pcss compilation on imported files 8add0747 Match the webpack configuration for the new IconMinimizer feature 65d6e704 Watch the `core-bundle/contao` directory for template changes as well c4933afb Also add the new `contao-backend` asset to all occurrences e84e01ab Update the package.lock a7b6b8f6 Update package-lock 5545373b Revert the `contao-backend` entry and update the public path in DevSe… e6a09647 Update `package-lock.json` 46af7a7a Revert and rebuild the assets 4c850230 Simplify webpack configuration 9818a8d1 Update webpack configuration d0517850 Remove the trailing slashes and uncomment the live reload for HMR
Close #1290
Upgrade webpack-dev-server didn't have impact for Encore itself, but it can be the case for end-users.
After upgrading webpack-dev-server to ^5.0, my project that use the following devServer configuration is still working as expected: